<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>二维码生成示例</title>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/qrcodejs/1.0.0/qrcode.min.js"></script>
  </head>
  <body>
    <div id="qrcode"></div>

    <script>
      var imageUrl = "https://gitee.com/ali-go/huangmenji-photo/raw/master/1.jpg";
      if (imageUrl) {
        new QRCode(document.getElementById("qrcode"), {
          text: imageUrl,
          width: 256,
          height: 256,
        });
      } else {
        console.error("请提供有效的图片URL");
      }
    </script>
  </body>
</html>
